package com.ztjy.bean;

import java.io.Serializable;
import java.util.Date;

import lombok.Data;
import lombok.Value;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * users
 *
 * @author cq
 */
@Data
public class Users implements Serializable {
    /**
     * 用户编号,主键
     */
    private Integer uId;

    /**
     * 用户名称
     */
    private String uname;

    /**
     * 用户密码
     */
    private String upassword;

    /**
     * 用户电话号码
     */
    private String utelephone;

    /**
     * 职位id,外键 1 经理 2 员工
     */
    private Integer jobId;

    /**
     * 性别 1男2女
     */
    private Integer sex;

    /**
     * 状态id,1:在职2:离职
     */
    private Integer statusId;

    /**
     * 入职时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date hiredate;

    /**
     * 离职时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date leavedate;

    /**
     * 出生日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    private Integer deptId;
    //自定义的属性
    private Integer age;    //mysql函数 去获取
    private Dept dept;      //通过外键获取
    private Job job;        //通过外键获取

    private static final long serialVersionUID = 1L;

    public Integer getuId() {
        return uId;
    }

    public void setuId(Integer uId) {
        this.uId = uId;
    }

    public Integer getDeptId() {
        return deptId;
    }

    public void setDeptId(Integer deptId) {
        this.deptId = deptId;
    }
}